﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Infrastructure
{
    public class TFSServiceWrapper
    {
        private static readonly TFSServiceWrapper _instance = new TFSServiceWrapper();

        private readonly string _remoteAddress = new Uri(Application.Current.Host.Source, "/TFSService.svc").OriginalString;

        private readonly string ServiceEndPointName;

        private TFSServiceClient.TFSServiceClient _serviceClient;

        private TFSServiceWrapper()
        {
            ServiceEndPointName = "CustomBinding_ITFSService";
        }

        public static TFSServiceWrapper Instance
        {
            get
            {
                return _instance;
            }
        }

        public TFSServiceClient.TFSServiceClient ServiceClient
        {
            get
            {
                return new Infrastructure.TFSServiceClient.TFSServiceClient(ServiceEndPointName, _remoteAddress);
            }
        }
    }
}
